// const timeMiddleware = (store) => (next) => (action) => {
//   console.log('timeMiddleware', +new Date());
//   next(action);
// };

function timeMiddleware({ getState, dispatch }) {
  return function (next) {
    console.log('111');
    return function (action) {
      console.log('dispatch 222 start');
      console.log('timeMiddleware', +new Date());
      next(action);
      console.log('dispatch 222 end');
    };
  };
}

export default timeMiddleware;
